<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>快餐店点餐系统 - 用户注册</title>
    <style>
        body {
            font-family: "Arial", sans-serif;
            margin: 0;
            padding: 0;
            background: url('background.jpg') no-repeat center center fixed;
            background-size: cover;
            color: #fff;
        }

        .navbar {
            width: 100%;
            position: fixed;
            top: 0;
            left: 0;
            background-color: rgba(0, 0, 0, 0.7);
            padding: 15px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            z-index: 1000;
        }

        .navbar a {
            color: #ffffff;
            text-decoration: none;
            font-size: 16px;
            margin: 0 10px;
            padding: 5px 10px;
            border-radius: 5px;
        }

        .navbar a:hover {
            background-color: rgba(255, 255, 255, 0.2);
        }

        .container {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            text-align: center;
        }

        .card {
            background: rgba(0, 0, 0, 0.6);
            padding: 30px;
            border-radius: 10px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
            width: 350px;
        }

        .card h2 {
            color: #ff6f61;
            margin-bottom: 20px;
        }

        .card label {
            display: block;
            text-align: left;
            margin-bottom: 5px;
            font-size: 14px;
            color: #fff;
        }

        .card input[type="text"],
        .card input[type="password"],
        .card select {
            width: 100%;
            padding: 10px;
            margin-bottom: 15px;
            border: 1px solid #ced4da;
            border-radius: 4px;
            background: #ffffff;
            font-size: 14px;
            color: #495057;
        }

        .card input[type="text"]:focus,
        .card input[type="password"]:focus,
        .card select:focus {
            border-color: #ff6f61;
            outline: none;
            box-shadow: 0 0 5px rgba(255, 111, 97, 0.5);
        }

        .card button {
            width: 100%;
            padding: 10px;
            background: #ff6f61;
            color: white;
            border: none;
            border-radius: 4px;
            font-size: 16px;
            cursor: pointer;
        }

        .card button:hover {
            background: #ff5a4d;
        }

        .card a {
            display: inline-block;
            margin-top: 15px;
            color: #ff6f61;
            text-decoration: none;
            font-size: 14px;
        }

        .card a:hover {
            text-decoration: underline;
        }
    </style>
</head>
<body>
<!-- 顶部导航栏 -->
<div class="navbar">
    <div>快餐店点餐系统</div>
    <div>
        <a href="index.jsp">首页</a>
        <a href="login.jsp">登录</a>
    </div>
</div>

<!-- 主体内容 -->
<div class="container">
    <div class="card">
        <h2>注册</h2>
        <form action="register" method="post">
            <label for="username">用户名</label>
            <input type="text" id="username" name="username" placeholder="请输入用户名" required>

            <label for="password">密码</label>
            <input type="password" id="password" name="password" placeholder="请输入密码" required>

            <label for="role">角色</label>
            <select name="role" id="role" required>
                <option value="3">顾客</option>
                <option value="2">厨师</option>
            </select>

            <button type="submit">注册</button>
        </form>
        <a href="login.jsp">已有账户？点击登录</a>
    </div>
</div>
</body>
</html>
